package com.shujia.day14;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;

public class Code08OutputStreamWriter {
    public static void main(String[] args) throws IOException {

//        OutputStreamWriter outputStreamWriter = new OutputStreamWriter(new FileOutputStream("data/f.txt"));

//        outputStreamWriter.write(98);
//        outputStreamWriter.flush();

//        outputStreamWriter.write("abc");
//        outputStreamWriter.flush();
//
//        outputStreamWriter.close();

        OutputStreamWriter outputStreamWriter2 = new OutputStreamWriter(new FileOutputStream("data/f.txt"), "GBK");
        outputStreamWriter2.write("班长在干啥？");
        outputStreamWriter2.flush();
        outputStreamWriter2.close();

    }
}
